KNOWLEDGEBASE - ARTICLE #1922

How to make the width of the bars of one graph match the width of the bars made in a new or existing graph with a different number of bars.

The Problem

When Prism makes a new graph, it always makes the lengths of the Y and X according to the choice in the in the preferences dialog.  If graphs have different number of bars, Prism will change the width of the bars to fill in the specified width (length) of the X axis.  The fewer bars you have, the wider they become to fit the range of the X axes length.  The more bars you have, the shorter the width.  There is no automatic way Prism can make the bar width in one graph equal the bar width in another graph.  However, this can be done manually in two different ways.  

Example: You’ve made a grouped bar graph with 3 columns and 3 rows. 

So, your graph may look something like this.

You now make a new data table that only has two rows instead of three. 

Because the X axis remains the same length, the bars in the new graph (two rows of data) will be wider. 

*The bars are now wider

To Fix

Method 1. Make the graph narrower.

Because you reduced your table from 3 rows to 2 rows, there are only six bars. Since you reduced the number of bars by 30% (from 9 bars to 6 bars), you should reduce the width (Length of the X axes) of the graph by one-third, from 3 inches to 2 inches. Set this on the first tab, “Frame and Origin”, of the Format Axes dialog. 

Now the width of the bars are identical to the graph with 3 rows of data, but the graph is narrower. 

Method 2. Leave space for missing bars

Create zero height bars by excluding a value in an empty data table in your data set.  Prism will think there are still three rows which will match the original data table.

Prism will create a zero height bar because of the excluded value.  Because Prism still displays 3 rows in the graph, the bar widths are identical to the original graph. The graph has the same width as before, but has an empty space corresponding to the zero height bars.

Note: The same principle will work when creating multiple Column Graphs with a different number of bars. 

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.